package priv.mill.server.impl;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import priv.mill.dao.mapper.AnswerMapper;
import priv.mill.entry.Answer;
import priv.mill.server.AnswerService;

@Component
public class AnswerServiceImpl implements AnswerService{

	private static final Logger logger = Logger
			.getLogger(AnswerServiceImpl.class);

	@Autowired
	private AnswerMapper AnswerMapper;
	
	@Override
	public Answer getAnswerById(Integer AnswerId) {
		return AnswerMapper.getAnswerById(AnswerId);
	}

	@Override
	public Answer getAnswerByEntry(Answer Answer) {
		return AnswerMapper.getAnswerByEntry(Answer);
	}

	@Override
	public List<Answer> getAnswersByPage(Answer Answer) {
		return AnswerMapper.getAnswersByPage(Answer);
	}

	@Override
	public int updateAnswer(Answer Answer) {
		return AnswerMapper.updateAnswer(Answer);
	}

	@Override
	public int insertAnswer(Answer Answer) {
		return AnswerMapper.insertAnswer(Answer);
	}

	@Override
	public int deleteAnswer(Integer AnswerId) {
		return AnswerMapper.deleteAnswer(AnswerId);
	}
}
